<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/UI/Resource/yahei11_font.c 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_c78dc1806c68fd338fba226975244931.html">UI</a></li><li class="navelem"><a class="el" href="dir_7c86a8dfeb4ecb1903ae154e0f5e8956.html">Resource</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">yahei11_font.c</div></div>
</div><!--header-->
<div class="contents">
<a href="yahei11__font_8c.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> *---------------------------------------------------------------</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *                        Lvgl Font Tool</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> *</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> * 注:使用unicode编码</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"> * 注:本字体文件由Lvgl Font Tool V0.3 生成</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment"> * 作者:阿里(qq:617622104)</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"> *---------------------------------------------------------------</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"> */</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;lvgl.h&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment">/* 使用说明 :</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment"> * 1、利用外部存储介质导入字库至 SPI-Flash (只需要做一次, ROM 掉电不丢失)</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment"> * 2、将 SPI-Flash 内的字库拷贝到 SDRAM , 并对 &lt;lv_font_t&gt; demo_font 赋值(每次复位上电都需要做, RAM 掉电丢失)</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment"> * 3、依赖 &lt;lv_font_t&gt; demo_font 字体源设置字体样式, 并赋予对应对象生效, 样式设置有如下两种方式 :</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment"> *</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment"> * eg 针对 LVGL-V7.11 , 对于其他 LVGL 版本原理类似, API 则不尽相同.</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment"> *</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="comment"> * &lt;1&gt; 全局样式</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="comment"> * lv_style_set_text_font(style_obj, LV_STATE_DEFAULT, &amp;demo_font);(注意 : style_obj 须要提前完成各字段的初始化赋值 lv_style_init(style_obj);)</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="comment"> * lv_obj_add_style(label, LV_LABEL_PART_MAIN, style_label); //将字体样式赋予对应的对象</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="comment"> *</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="comment"> * &lt;2&gt; 本地样式</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="comment"> * lv_obj_set_style_local_text_font(obj, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, &amp;demo_font);</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="comment"> */</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="yahei11__font_8c.html#ac0feb0daf4599ace6701533c747eca2c">   28</a></span>uint32_t <a class="code hl_variable" href="yahei11__font_8c.html#ac0feb0daf4599ace6701533c747eca2c">Yahei11_Font_Addr</a> = 0;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>{</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>    uint16_t <a class="code hl_function" href="_flash_disk_8c.html#a10afa6cfd9fc23db2b431ccf9f332f30">min</a>;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>    uint16_t max;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>    uint8_t bpp;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>    uint8_t reserved[3];</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>} <a class="code hl_struct" href="structx__header__t.html">x_header_t</a>;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>{</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span>    uint32_t pos;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>} <a class="code hl_struct" href="structx__table__t.html">x_table_t</a>;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>{</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>    uint8_t adv_w;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>    uint8_t box_w;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>    uint8_t box_h;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>    int8_t ofs_y;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>} <a class="code hl_struct" href="structglyph__dsc__t.html">glyph_dsc_t</a>;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">   51</a></span><span class="keyword">static</span> <a class="code hl_struct" href="structx__header__t.html">x_header_t</a> <a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a> = {</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>    .<a class="code hl_variable" href="structx__header__t.html#a1a1f4624f66ab0b2eb0b98316514c369">min</a> = 0,</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>    .max = 0,</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>    .bpp = 0,</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>};</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span><span class="comment">// static uint8_t __g_font_buf[104];//如bin文件存在SPI FLASH可使用此buff</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="yahei11__font_8c.html#ada1b95a8e25fbd07bb57e5553d80ad4f">   59</a></span><span class="keyword">static</span> uint8_t *<a class="code hl_function" href="yahei11__font_8c.html#ada1b95a8e25fbd07bb57e5553d80ad4f">__user_font_getdata</a>(<span class="keywordtype">int</span> offset, <span class="keywordtype">int</span> size)</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>{</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>    <span class="comment">//如字模保存在SPI FLASH, SPIFLASH_Read(__g_font_buf,offset,size);</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>    <span class="comment">//如字模已加载到SDRAM,直接返回偏移地址即可如:return (uint8_t*)(sdram_fontddr+offset);</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>    <span class="keywordflow">return</span> (uint8_t *)(<a class="code hl_variable" href="yahei11__font_8c.html#ac0feb0daf4599ace6701533c747eca2c">Yahei11_Font_Addr</a> + offset);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>}</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="yahei11__font_8c.html#a561d824ec632bb3511f38097571ac3eb">   67</a></span><span class="keyword">static</span> <span class="keyword">const</span> uint8_t *<a class="code hl_function" href="yahei11__font_8c.html#a561d824ec632bb3511f38097571ac3eb">__user_font_get_bitmap</a>(<span class="keyword">const</span> lv_font_t *font, uint32_t unicode_letter)</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>{</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>    <span class="keywordflow">if</span> (<a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>.<a class="code hl_variable" href="structx__header__t.html#ac66b569507cc273bbf83ce5dd5f70e84">max</a> == 0)</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>    {</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span>        uint8_t *p = <a class="code hl_function" href="yahei11__font_8c.html#ada1b95a8e25fbd07bb57e5553d80ad4f">__user_font_getdata</a>(0, <span class="keyword">sizeof</span>(<a class="code hl_struct" href="structx__header__t.html">x_header_t</a>));</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span>        memcpy(&amp;<a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>, p, <span class="keyword">sizeof</span>(<a class="code hl_struct" href="structx__header__t.html">x_header_t</a>));</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>    }</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>    <span class="keywordflow">if</span> (unicode_letter &gt; <a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>.<a class="code hl_variable" href="structx__header__t.html#ac66b569507cc273bbf83ce5dd5f70e84">max</a> || unicode_letter &lt; <a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>.<a class="code hl_variable" href="structx__header__t.html#a1a1f4624f66ab0b2eb0b98316514c369">min</a>)</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    {</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>        <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>    }</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>    uint32_t unicode_offset = <span class="keyword">sizeof</span>(<a class="code hl_struct" href="structx__header__t.html">x_header_t</a>) + (unicode_letter - <a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>.<a class="code hl_variable" href="structx__header__t.html#a1a1f4624f66ab0b2eb0b98316514c369">min</a>) * 4;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>    uint32_t *p_pos = (uint32_t *)<a class="code hl_function" href="yahei11__font_8c.html#ada1b95a8e25fbd07bb57e5553d80ad4f">__user_font_getdata</a>(unicode_offset, 4);</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span>    <span class="keywordflow">if</span> (p_pos[0] != 0)</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>    {</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>        uint32_t pos = p_pos[0];</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>        <a class="code hl_struct" href="structglyph__dsc__t.html">glyph_dsc_t</a> *gdsc = (<a class="code hl_struct" href="structglyph__dsc__t.html">glyph_dsc_t</a> *)<a class="code hl_function" href="yahei11__font_8c.html#ada1b95a8e25fbd07bb57e5553d80ad4f">__user_font_getdata</a>(pos, <span class="keyword">sizeof</span>(<a class="code hl_struct" href="structglyph__dsc__t.html">glyph_dsc_t</a>));</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>        <span class="keywordflow">return</span> <a class="code hl_function" href="yahei11__font_8c.html#ada1b95a8e25fbd07bb57e5553d80ad4f">__user_font_getdata</a>(pos + <span class="keyword">sizeof</span>(<a class="code hl_struct" href="structglyph__dsc__t.html">glyph_dsc_t</a>), gdsc-&gt;<a class="code hl_variable" href="structglyph__dsc__t.html#a707b2dfb300e1986555ae5bbfeeaba37">box_w</a> * gdsc-&gt;<a class="code hl_variable" href="structglyph__dsc__t.html#ab187b8b757c0f75c1d46d228496790e5">box_h</a> * <a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>.<a class="code hl_variable" href="structx__header__t.html#a496818f626ceb32365ca6cf57c991979">bpp</a> / 8);</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span>    }</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>    <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>}</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span> </div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"><a class="line" href="yahei11__font_8c.html#a0d7c694bb2c603e2bdae258f339344b3">   89</a></span><span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="yahei11__font_8c.html#a0d7c694bb2c603e2bdae258f339344b3">__user_font_get_glyph_dsc</a>(<span class="keyword">const</span> lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next)</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>{</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>    <span class="keywordflow">if</span> (<a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>.<a class="code hl_variable" href="structx__header__t.html#ac66b569507cc273bbf83ce5dd5f70e84">max</a> == 0)</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>    {</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>        uint8_t *p = <a class="code hl_function" href="yahei11__font_8c.html#ada1b95a8e25fbd07bb57e5553d80ad4f">__user_font_getdata</a>(0, <span class="keyword">sizeof</span>(<a class="code hl_struct" href="structx__header__t.html">x_header_t</a>));</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>        memcpy(&amp;<a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>, p, <span class="keyword">sizeof</span>(<a class="code hl_struct" href="structx__header__t.html">x_header_t</a>));</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>    }</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>    <span class="keywordflow">if</span> (unicode_letter &gt; <a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>.<a class="code hl_variable" href="structx__header__t.html#ac66b569507cc273bbf83ce5dd5f70e84">max</a> || unicode_letter &lt; <a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>.<a class="code hl_variable" href="structx__header__t.html#a1a1f4624f66ab0b2eb0b98316514c369">min</a>)</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>    {</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span>        <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>    }</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>    uint32_t unicode_offset = <span class="keyword">sizeof</span>(<a class="code hl_struct" href="structx__header__t.html">x_header_t</a>) + (unicode_letter - <a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>.<a class="code hl_variable" href="structx__header__t.html#a1a1f4624f66ab0b2eb0b98316514c369">min</a>) * 4;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>    uint32_t *p_pos = (uint32_t *)<a class="code hl_function" href="yahei11__font_8c.html#ada1b95a8e25fbd07bb57e5553d80ad4f">__user_font_getdata</a>(unicode_offset, 4);</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>    <span class="keywordflow">if</span> (p_pos[0] != 0)</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>    {</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>        <a class="code hl_struct" href="structglyph__dsc__t.html">glyph_dsc_t</a> *gdsc = (<a class="code hl_struct" href="structglyph__dsc__t.html">glyph_dsc_t</a> *)<a class="code hl_function" href="yahei11__font_8c.html#ada1b95a8e25fbd07bb57e5553d80ad4f">__user_font_getdata</a>(p_pos[0], <span class="keyword">sizeof</span>(<a class="code hl_struct" href="structglyph__dsc__t.html">glyph_dsc_t</a>));</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>        dsc_out-&gt;adv_w = gdsc-&gt;<a class="code hl_variable" href="structglyph__dsc__t.html#aa15af87137fff895a57de6c9adea89e5">adv_w</a>;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>        dsc_out-&gt;box_h = gdsc-&gt;<a class="code hl_variable" href="structglyph__dsc__t.html#ab187b8b757c0f75c1d46d228496790e5">box_h</a>;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>        dsc_out-&gt;box_w = gdsc-&gt;<a class="code hl_variable" href="structglyph__dsc__t.html#a707b2dfb300e1986555ae5bbfeeaba37">box_w</a>;</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>        dsc_out-&gt;ofs_x = 0;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>        dsc_out-&gt;ofs_y = gdsc-&gt;<a class="code hl_variable" href="structglyph__dsc__t.html#a176ac4e3120f3562ccc1642cff370e1b">ofs_y</a>;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>        dsc_out-&gt;bpp = <a class="code hl_variable" href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a>.<a class="code hl_variable" href="structx__header__t.html#a496818f626ceb32365ca6cf57c991979">bpp</a>;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>    }</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>}</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span><span class="comment">//微软雅黑,Regular,11</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span><span class="comment">//字模高度：20</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span><span class="comment">// XBF字体,外部bin文件</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"><a class="line" href="yahei11__font_8c.html#a66222e84b7bca37e2963fdeae91775fa">  119</a></span>lv_font_t <a class="code hl_variable" href="yahei11__font_8c.html#a66222e84b7bca37e2963fdeae91775fa">yahei11_font</a> = {</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>    .get_glyph_bitmap = <a class="code hl_function" href="yahei11__font_8c.html#a561d824ec632bb3511f38097571ac3eb">__user_font_get_bitmap</a>,</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>    .get_glyph_dsc = <a class="code hl_function" href="yahei11__font_8c.html#a0d7c694bb2c603e2bdae258f339344b3">__user_font_get_glyph_dsc</a>,</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>    .line_height = 20,</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>    .base_line = 0,</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>};</div>
<div class="ttc" id="a_flash_disk_8c_html_a10afa6cfd9fc23db2b431ccf9f332f30"><div class="ttname"><a href="_flash_disk_8c.html#a10afa6cfd9fc23db2b431ccf9f332f30">min</a></div><div class="ttdeci">static __INLINE uint32_t min(uint32_t a, uint32_t b)</div><div class="ttdoc">比较两个值, 并返回较小的那个</div><div class="ttdef"><b>Definition:</b> <a href="_flash_disk_8c_source.html#l00055">FlashDisk.c:55</a></div></div>
<div class="ttc" id="astructglyph__dsc__t_html"><div class="ttname"><a href="structglyph__dsc__t.html">glyph_dsc_t</a></div><div class="ttdef"><b>Definition:</b> <a href="demo__font_8c_source.html#l00039">demo_font.c:39</a></div></div>
<div class="ttc" id="astructglyph__dsc__t_html_a176ac4e3120f3562ccc1642cff370e1b"><div class="ttname"><a href="structglyph__dsc__t.html#a176ac4e3120f3562ccc1642cff370e1b">glyph_dsc_t::ofs_y</a></div><div class="ttdeci">int8_t ofs_y</div><div class="ttdef"><b>Definition:</b> <a href="demo__font_8c_source.html#l00044">demo_font.c:44</a></div></div>
<div class="ttc" id="astructglyph__dsc__t_html_a707b2dfb300e1986555ae5bbfeeaba37"><div class="ttname"><a href="structglyph__dsc__t.html#a707b2dfb300e1986555ae5bbfeeaba37">glyph_dsc_t::box_w</a></div><div class="ttdeci">uint8_t box_w</div><div class="ttdef"><b>Definition:</b> <a href="demo__font_8c_source.html#l00041">demo_font.c:41</a></div></div>
<div class="ttc" id="astructglyph__dsc__t_html_aa15af87137fff895a57de6c9adea89e5"><div class="ttname"><a href="structglyph__dsc__t.html#aa15af87137fff895a57de6c9adea89e5">glyph_dsc_t::adv_w</a></div><div class="ttdeci">uint8_t adv_w</div><div class="ttdef"><b>Definition:</b> <a href="demo__font_8c_source.html#l00040">demo_font.c:40</a></div></div>
<div class="ttc" id="astructglyph__dsc__t_html_ab187b8b757c0f75c1d46d228496790e5"><div class="ttname"><a href="structglyph__dsc__t.html#ab187b8b757c0f75c1d46d228496790e5">glyph_dsc_t::box_h</a></div><div class="ttdeci">uint8_t box_h</div><div class="ttdef"><b>Definition:</b> <a href="demo__font_8c_source.html#l00042">demo_font.c:42</a></div></div>
<div class="ttc" id="astructx__header__t_html"><div class="ttname"><a href="structx__header__t.html">x_header_t</a></div><div class="ttdef"><b>Definition:</b> <a href="demo__font_8c_source.html#l00030">demo_font.c:30</a></div></div>
<div class="ttc" id="astructx__header__t_html_a1a1f4624f66ab0b2eb0b98316514c369"><div class="ttname"><a href="structx__header__t.html#a1a1f4624f66ab0b2eb0b98316514c369">x_header_t::min</a></div><div class="ttdeci">uint16_t min</div><div class="ttdef"><b>Definition:</b> <a href="demo__font_8c_source.html#l00031">demo_font.c:31</a></div></div>
<div class="ttc" id="astructx__header__t_html_a496818f626ceb32365ca6cf57c991979"><div class="ttname"><a href="structx__header__t.html#a496818f626ceb32365ca6cf57c991979">x_header_t::bpp</a></div><div class="ttdeci">uint8_t bpp</div><div class="ttdef"><b>Definition:</b> <a href="demo__font_8c_source.html#l00033">demo_font.c:33</a></div></div>
<div class="ttc" id="astructx__header__t_html_ac66b569507cc273bbf83ce5dd5f70e84"><div class="ttname"><a href="structx__header__t.html#ac66b569507cc273bbf83ce5dd5f70e84">x_header_t::max</a></div><div class="ttdeci">uint16_t max</div><div class="ttdef"><b>Definition:</b> <a href="demo__font_8c_source.html#l00032">demo_font.c:32</a></div></div>
<div class="ttc" id="astructx__table__t_html"><div class="ttname"><a href="structx__table__t.html">x_table_t</a></div><div class="ttdef"><b>Definition:</b> <a href="demo__font_8c_source.html#l00036">demo_font.c:36</a></div></div>
<div class="ttc" id="ayahei11__font_8c_html_a0d7c694bb2c603e2bdae258f339344b3"><div class="ttname"><a href="yahei11__font_8c.html#a0d7c694bb2c603e2bdae258f339344b3">__user_font_get_glyph_dsc</a></div><div class="ttdeci">static bool __user_font_get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next)</div><div class="ttdef"><b>Definition:</b> <a href="yahei11__font_8c_source.html#l00089">yahei11_font.c:89</a></div></div>
<div class="ttc" id="ayahei11__font_8c_html_a561d824ec632bb3511f38097571ac3eb"><div class="ttname"><a href="yahei11__font_8c.html#a561d824ec632bb3511f38097571ac3eb">__user_font_get_bitmap</a></div><div class="ttdeci">static const uint8_t * __user_font_get_bitmap(const lv_font_t *font, uint32_t unicode_letter)</div><div class="ttdef"><b>Definition:</b> <a href="yahei11__font_8c_source.html#l00067">yahei11_font.c:67</a></div></div>
<div class="ttc" id="ayahei11__font_8c_html_a66222e84b7bca37e2963fdeae91775fa"><div class="ttname"><a href="yahei11__font_8c.html#a66222e84b7bca37e2963fdeae91775fa">yahei11_font</a></div><div class="ttdeci">lv_font_t yahei11_font</div><div class="ttdef"><b>Definition:</b> <a href="yahei11__font_8c_source.html#l00119">yahei11_font.c:119</a></div></div>
<div class="ttc" id="ayahei11__font_8c_html_a760d35032273f62ea485d8ed311173b0"><div class="ttname"><a href="yahei11__font_8c.html#a760d35032273f62ea485d8ed311173b0">__g_xbf_hd</a></div><div class="ttdeci">static x_header_t __g_xbf_hd</div><div class="ttdef"><b>Definition:</b> <a href="yahei11__font_8c_source.html#l00051">yahei11_font.c:51</a></div></div>
<div class="ttc" id="ayahei11__font_8c_html_ac0feb0daf4599ace6701533c747eca2c"><div class="ttname"><a href="yahei11__font_8c.html#ac0feb0daf4599ace6701533c747eca2c">Yahei11_Font_Addr</a></div><div class="ttdeci">uint32_t Yahei11_Font_Addr</div><div class="ttdef"><b>Definition:</b> <a href="yahei11__font_8c_source.html#l00028">yahei11_font.c:28</a></div></div>
<div class="ttc" id="ayahei11__font_8c_html_ada1b95a8e25fbd07bb57e5553d80ad4f"><div class="ttname"><a href="yahei11__font_8c.html#ada1b95a8e25fbd07bb57e5553d80ad4f">__user_font_getdata</a></div><div class="ttdeci">static uint8_t * __user_font_getdata(int offset, int size)</div><div class="ttdef"><b>Definition:</b> <a href="yahei11__font_8c_source.html#l00059">yahei11_font.c:59</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
